import { createApp } from "vue";
import App from "./App.vue";
import router from "./router/router";
import "virtual:windi.css";
import pinia from "@/store/pinia";
import { Toast } from "vant";
import { Dialog } from "vant";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import "vant/es/toast/style";
import "vant/es/dialog/style";
import NutUI from "@nutui/nutui";
import "@nutui/nutui/dist/style.css";
import { ImagePreview } from "vant";
pinia.use(piniaPluginPersistedstate);
const app = createApp(App);
app.provide("global", {
  oss_url: "https://jy-project.oss-cn-beijing.aliyuncs.com/",
  accessKeyId: "LTAI5tSCF2GyD4iV5uDnAmbR",
  accessKeySecret: "YjarIxspxSTtfBAKsYLNmqaAxp34W3",
  bucket: "jy-project",
  region: "oss-cn-beijing",
});
app.use(router);
app.use(pinia);
app.use(NutUI).use(ImagePreview);
app.use(Toast).use(Dialog);
router.isReady().then(() => app.mount("#app"));
